/**
 * 
 */
package com.java.test.user.dto;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

/**
 * @author // ip审查
 *
 */
public class IpcheckInfo implements RowMapper<IpcheckInfo> {

	// id
	private int id;

	// 账号
	private String accountNo;

	// 使用时间
	private String useTime;

	// 使用ip
	private String useIp;

	// 0:注册 1：登陆
	private int useType;

	// 使用次数
	private int ipUseCount;

	// 账号状态 1：启动 0：冻结
	private int accountStatus;

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getAccountNo() {
		return accountNo;
	}

	public void setAccountNo(String accountNo) {
		this.accountNo = accountNo;
	}

	public String getUseTime() {
		return useTime;
	}

	public void setUseTime(String useTime) {
		this.useTime = useTime;
	}

	public String getUseIp() {
		return useIp;
	}

	public void setUseIp(String useIp) {
		this.useIp = useIp;
	}

	public int getUseType() {
		return useType;
	}

	public void setUseType(int useType) {
		this.useType = useType;
	}

	public int getIpUseCount() {
		return ipUseCount;
	}

	public void setIpUseCount(int ipUseCount) {
		this.ipUseCount = ipUseCount;
	}

	public int getAccountStatus() {
		return accountStatus;
	}

	public void setAccountStatus(int accountStatus) {
		this.accountStatus = accountStatus;
	}

	public IpcheckInfo() {
		super();
		// TODO Auto-generated constructor stub
	}

	public IpcheckInfo(int id, String accountNo, String useTime, String useIp, int useType, int ipUseCount,
			int accountStatus) {
		super();
		this.id = id;
		this.accountNo = accountNo;
		this.useTime = useTime;
		this.useIp = useIp;
		this.useType = useType;
		this.ipUseCount = ipUseCount;
		this.accountStatus = accountStatus;
	}

	@Override
	public IpcheckInfo mapRow(ResultSet rs, int rowNum) throws SQLException {
		IpcheckInfo info = new IpcheckInfo();
		info.setId(rs.getInt("id"));
		info.setAccountNo(rs.getString("account_no"));
		info.setUseTime(rs.getString("use_time"));
		info.setUseIp(rs.getString("use_ip"));
		info.setUseType(rs.getInt("use_type"));
		info.setIpUseCount(rs.getInt("ip_use_count"));
		info.setAccountStatus(rs.getInt("account_status"));
		return info;
	}

}
